#ifndef SHADER_H
#define SHADER_H

#include <GLee.h>
#include <GL/gl.h>
#include <string>
#include <map>

namespace GL
{

class Shader
{
public:
    Shader(const std::string& shader, bool isFilename);
    virtual ~Shader();
    virtual bool compile() = 0;
    
    GLuint getShaderId();
    GLuint getProgramId();
    void addUniformVariable(const std::string& name);
    void setUniformVariable(const std::string& name, int value);
    void setUniformVariable(const std::string& name, float value);
    
protected:
    bool link();
    
    GLuint                          m_ProgramObject;
    GLuint                          m_ShaderId;
    std::string                     m_ShaderContents;
    std::map<std::string, GLint>    m_UniformVariables;
};

}

#endif
